﻿
$(function () {
    $("#_orgtree_btn").live('click', function () {
        var json = "{}";
        $.ajax({
            url: "/organization/list",
            cache: false,
            type: 'POST',
            contentType: 'application/json; charset=utf-8',
            data: json,
            statusCode: {
                200: function(result) {
                    for (var i = 0; i < result.length; i++) {
                        //{"id":"ORG-379","pId":"ORG-CC370","category":2,"name":"组织名称379",
                        //"createdTime":"2005-04-15T00:00:00","modifiedTime":"2009-05-04T00:00:00",
                        //"createrId":"d1e-030","menderId":"82e-005","isDeleted":false}
                        var p = "<p>" + result[i].id + "<i></i>"
                            + result[i].pId + "<i></i>"
                            + result[i].category + "<i></i>"
                            + result[i].name + "<i></i>"
                            + result[i].createdTime + "<i></i></p>";
                        showDebugInfo(p);
                    }
                }
            },
        });
    });
})